"""import time
for _ in range(3600):
    print('hello world')
    time.sleep(1)"""
total = 0
for i in range(1,101):
    total += i
print(total)
total = 0
for i in range(1,101):
    if i%2 ==0:
        total += i
print(total)
total = 0
for i in range(0,101,2):
   total += i
print(total)
print(sum(range(2,101,2)))
total = 0
i = 1
while i <= 100:
    total += i
    i += 1
print(total)
total = 0
i = 2
while True:
    total += i
    i += 2
    if i>100:
        break
print(total)
total = 0
for i in range(1,101):
    if i%2 != 0:
        continue
    total += i
print(total)
for i in range(1,10):
    for j in range(1,i+1):
        print(f'{i}*{j}={i*j}',end='\t')
    print()
num = int(input('请输入一个正整数：'))
end = int(num ** 0.5)
is_prime = True
for i in range(2,end+1):
    if num%i ==0:
        is_prime = False
        break
if is_prime:
    print(f'{num}是素数')
else:
    print(f'{num}不是素数')
x = int(input('x = '))
y = int(input('y = '))
for i in range(x,0,-1):
    if x%i == 0 and y%i == 0:
        print(f'最大公约数{i}')
        break
x=int(input('x = '))
y=int(input('y = '))
while y % x != 0 :
    x,y=y % x,x
print(f'最大公约数{x}')

import random

answer = random.randrange(1,101)
counter = 0
while True:
    counter += 1
    num = int(input('请输入：'))
    if num < answer:
        print('大一点')
    elif num > answer:
        print('小一点')
    else:
        print('猜对了')
        break
print(f'你一共猜了{counter}次')